<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>房屋信息添加</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  <link rel="stylesheet" type="text/css" href="css/style.css">
   <script type="text/javascript">
        function pass(){
                 var pass=false;
                 if(document.form1.title.value==""){
                    alert("标题不能为空！");
                    pass=false;
                 }else if(document.form1.district_id.value=="0"){
                    alert("区县不能为空！");
                    pass=false;
                 }else if(document.form1.street_id.value=="0"){
                    alert("街道不能为空！");
                    pass=false;
                 }else 
                    pass=true;
                    
                    return pass;
        }
	    </script>
  </head>
  <body>
  <br>
  <%@taglib uri="/struts-tags" prefix="s" %>
  <s:form method="post" action="hinsert" name="form1" onsubmit="pass()">
   <table border="0" width="95%">
      <tr>
        <td colspan="4">发布售房信息：</td>
      </tr>
      <tr>
        <td width="15%" class="td_align">标题：</td>
        <td colspan="3"><input type="text" name="title" style="width:300px"></td>
      </tr>
      <tr>
        <td class="td_align">区县：        </td>
        <td width="35%"><select name="district_id">
          <option value="0">不限－－</option>
          <option value="1">清河区</option>
          <option value="2">清浦区</option>
          <option value="3">开发区</option>
          <option value="4">淮阴区</option>
                        </select></td>
        <td width="15%" class="td_align">街道：</td>
        <td width="35%"><select name="street_id">
          <option value="0">不限－－</option>
          <option value="7">延安路</option>
          <option value="8">上海路</option>
          <option value="14">黄河路</option>
          <option value="17">天津路</option>
        </select>
        </td>
      </tr>
      <tr>
        <td class="td_align">户型：</td>
        <td><select name="room" style="width:50px" >
         <option value="0">不限－－</option>
          <option value="1">1</option>
          <option value="2">2</option>
          <option value="3">3</option>
          <option value="4">4</option>
        </select>
        室  <select name="hall" style="width:50px">
        <option value="0">不限－－</option>
          <option value="1">1</option>
          <option value="2">2</option>
          <option value="3">3</option>
          <option value="4">4</option>
          </select>
        厅</td>
        <td class="td_align">楼层： </td>
        <td><input type="text" name="floor" style="width:80px"></td>
      </tr>
      <tr>
        <td class="td_align">面积：</td>
        <td><input type="text" name="area" style="width:80px">
          平方米</td>
        <td class="td_align">楼龄：</td>
        <td><input type="text" name="house_age" style="width:80px">
          年</td>
      </tr>
      <tr>
        <td class="td_align">物业名称：        </td>
        <td><input type="text" name="owner_name" style="width:110px"></td>
        <td class="td_align">物业类型：</td>
        <td><select name="owner_type">
        <option value="0">不限－－</option>
          <option value="国有">国有</option>
          <option value="民营">民营</option>
          <option value="私有">私有</option>
        </select>
        </td>
      </tr>
      <tr>
        <td class="td_align">售价：</td>
        <td><input type="text" name="price" style="width:70px">
          万元</td>
        <td class="td_align">房屋类型：</td>
        <td><select name="house_type" style="width:80px">
        <option value="0">不限－－</option>
		<option value="普通住宅">普通住宅</option>
		<option value="高层">高层</option>
		<option value="别墅">别墅</option>
        </select></td>
      </tr>
      <tr>
        <td class="td_align">联系电话：</td>
        <td><input type="text" name="telephone" style="width:100px"></td>
        <td class="td_align">联系人：</td>
        <td><input type="text" name="contract_man" style="width:100px"></td>
      </tr>
      <tr>
        <td class="td_align">房屋介绍：</td>
        <td colspan="3"><textarea name="remark" style="width:300px"></textarea>
        <input type="submit" name="Submit" value="提交"></td>
      </tr>
    </table>
  </s:form>
  </body>
</html>
